import { createStore } from "vuex";
import dictionaries from "@/store/modules/dictionaries";

export interface RootStore {
  [propName: string]: unknown;
}

export default createStore<RootStore>({
  state: {
    user: {
      username: "",
      isAdmin: false,
    },
  },
  mutations: {
    setUser(state, payload) {
      state.user = payload;
    },
  },
  actions: {},
  modules: {
    dictionaries,
  },
});
